package com.zccx.eth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;


/**
 * 该注解指定项目为springboot，由此类当作程序入口
 * 自动装配 web 依赖的环境
 **/
@Configuration
@SpringBootApplication
@EnableScheduling
@ImportResource("classpath:transaction.xml")
@ComponentScan(basePackages = {"com.zccx"})
@EnableJpaRepositories("com.zccx.eth.dao") // JPA扫描该包路径下的Repositorie
@EntityScan("com.zccx.eth.model")
public class SpringbootApplication {

    public static void start(String[] args) {
        main(args);
    }

    public static void stop(String[] args) {
        System.exit(0);
    }

    public static void main(String[] args) {
        SpringApplication.run(SpringbootApplication.class, args);
    }

//    @Bean
//    public Filter sessionFilter() {
//        return new AuthenticationFilter();
//    }
}
